﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="/easyui/demo.css">
<link rel="stylesheet" type="text/css" href="/easyui/base.css">
<link rel="stylesheet" type="text/css" href="/lib/Hui-iconfont/1.0.8/iconfont.css" />
<script type="text/javascript" src="/easyui/jquery.min.js"></script>
<script type="text/javascript" src="/easyui/jquery.easyui.min.js"></script>
</head>
<body class="easyui-layout">
	<div data-options="region:'center',border:false" style="padding:2px;height: auto">
		<table id="role_table"  class="easyui-treegrid" style="width:100%;height:100%;padding-bottom: 2px;"
			   data-options="
				pagination:true,	singleSelect:true,
				url:'/admin-role-query',
				method:'get',
				rownumbers:true,
				toolbar:'#tb'
				,idField:'id',
				treeField : 'region'"
			   >
			<thead>
				<tr>
					<th data-options="field:'region',width:'20%'"  >角色树形图</th>
					<th data-options="field:'f1',width:'20%',align:'center',formatter:formatCRUD">增</th>
					<th data-options="field:'f2',width:'20%',align:'center',formatter:formatCRUD">删</th>
					<th data-options="field:'f3',width:'20%',align:'center',formatter:formatCRUD">改</th>
					<th data-options="field:'f4',width:'20%',align:'center',formatter:formatCRUD">查</th>
				</tr>
			</thead>
		</table>
	</div>
</body>

<script type="text/javascript">
	function formatCRUD(value){
        if('1'==value){
        	return '<i class="Hui-iconfont">&#xe6a7;</i>'
        }else if('0'==value){
            return '<i class="Hui-iconfont">&#xe6a6;</i>'
        }
    }
</script>
</html>